home *** CD-ROM | disk | FTP | other *** search
Text File | 1986-09-21 | 970 b | 43 lines | [TEXT/ttxt] |
- \ Volume level calls
- \ 7/26/84 CBD Version 1.0
- \ 1/01/85 rw FlushVol
-
- \ get info for default vol - leave vol name at pad
- : volinfo { -- fcode }
- 0 ffcb 22 + w!
- 0 ffcb 28 + w!
- HFS? IF
- 9 ffcb +base dirfind
- ELSE ffcb fcall pbgetvinfo
- then ;
- \ ( -- #files )
- : filecount volinfo drop
- HFS? IF ffcb 52 + w@
- ELSE ffcb 40 + w@
- THEN ;
-
- \ ( file# -- b ) leave name of file at pad
- : Getidxfile { \ dirid -- }
- fFcb 28 + w! \ set file index
- pad +base fFcb 18 + ! \ filename addr
- pad 64 blanks getdirid: ffcb -> dirid
- fFcb fcall PBHGetFInfo
- 0= IF true ELSE false THEN
- dirid setdirid: ffcb
- 13 pad count + 1+ c! ;
-
- \ Print directory for current volume
- : Dir
- 0 -> curs fFcb clrFcb Filecount 1+ 1
- ." Directory for Volume: "
- Pad count type cr
- DO I Getidxfile Pad count Type CR ?Pause LOOP
- Filecount . ." Files." CR 1 -> curs ;
-
- : FlushVol
- clear: fFcb
- volinfo abort" GetVolInfo failed"
- 0 fFcb 12 + !
- fFcb fcall PBFlushVol abort" FlushVol failed"
- ;
-